/*
 * Based on the code
 *
 * Copyright (c) 2011 The Marcelo Mazzei Author. All rights reserved.
 */

	var metas = document.getElementsByTagName("meta"); 

	for (i=0;i<metas.length;i++) {
		nameAttrib = metas[i].name.search(/RATING/);
		if (nameAttrib!= -1) {
			nameAttrib = metas[i].content.search(/RTA-5042-1996-1400-1577-RTA/);
			if (nameAttrib!= -1) {
				chrome.extension.sendRequest({greeting: "adult"}, function(response) {});
				break;
			}
		} 
	} 

/*
var regex = /RTA-5042-1996-1400-1577-RTA/;

// Test the text of the body element against our regular expression.

if (regex.test(document.body.innerText)) {
  // The regular expression produced a match, so notify the background page.
  chrome.extension.sendRequest({}, function(response) {});
} else {
  // No match was found.
}
*/
